package com.seven.micro_service.controller;

import com.seven.micro_service.service.ServiceA;
import com.seven.micro_service.tools.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ControllerA {

    private ServiceA serviceA;
    @Autowired
    public void setServiceA(ServiceA serviceA) {
        this.serviceA = serviceA;
    }

    @GetMapping("/A")
    public Result<String> getServiceA(){
        return new Result<>(2000, "success", serviceA.toString());
    }
}
